package br.com.mestrefamiliar.util;

import br.com.mestrefamiliar.familia.FamiliaDAO;
import br.com.mestrefamiliar.familia.FamiliaDAOHibernate;
import br.com.mestrefamiliar.mestres.MestresDAO;
import br.com.mestrefamiliar.mestres.MestresDAOHibernate;
import br.com.mestrefamiliar.usuario.UsuarioDAO;
import br.com.mestrefamiliar.usuario.UsuarioDAOHibernate;

public class DAOFactory {
	
	public static UsuarioDAO criarUsuarioDAO() {
		UsuarioDAOHibernate usuarioDAO = new UsuarioDAOHibernate();
		usuarioDAO.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return usuarioDAO;
	}
	
	public static FamiliaDAO criarFamiliaDAO() {
		FamiliaDAOHibernate familiaDAO = new FamiliaDAOHibernate();
		familiaDAO.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return familiaDAO;
	}
	
	public static MestresDAO criarMestresDAO() {
		MestresDAOHibernate mestresDAO = new MestresDAOHibernate();
		mestresDAO.setSession(HibernateUtil.getSessionFactory().getCurrentSession());
		return mestresDAO;
	}

}
